home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / compress / gnucpio.zip / CPIO.H < prev    next >
C/C++ Source or Header  |  1992-05-29  |  2KB  |  70 lines

  1. /* Extended cpio format from POSIX.1.
  2.    Copyright (C) 1992 Free Software Foundation, Inc.
  3.  
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 2, or (at your option)
  7.    any later version.
  8.  
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  17.  
  18. #ifndef _CPIO_H
  19.  
  20. #define _CPIO_H 1
  21.  
  22. /* A cpio archive consists of a sequence of files.
  23.    Each file has a 76 byte header,
  24.    a variable length, NUL terminated filename,
  25.    and variable length file data.
  26.    A header for a filename "TRAILER!!!" indicates the end of the archive.  */
  27.  
  28. /* All the fields in the header are ISO 646 (approximately ASCII) strings
  29.    of octal numbers, left padded, not NUL terminated.
  30.  
  31.    Field Name    Length in Bytes    Notes
  32.    c_magic    6        must be "070707"
  33.    c_dev    6
  34.    c_ino    6
  35.    c_mode    6        see below for value
  36.    c_uid    6
  37.    c_gid    6
  38.    c_nlink    6
  39.    c_rdev    6        only valid for chr and blk special files
  40.    c_mtime    11
  41.    c_namesize    6        count includes terminating NUL in pathname
  42.    c_filesize    11        must be 0 for FIFOs and directories  */
  43.  
  44. /* Values for c_mode, OR'd together: */
  45.  
  46. #define C_IRUSR        000400
  47. #define C_IWUSR        000200
  48. #define C_IXUSR        000100
  49. #define C_IRGRP        000040
  50. #define C_IWGRP        000020
  51. #define C_IXGRP        000010
  52. #define C_IROTH        000004
  53. #define C_IWOTH        000002
  54. #define C_IXOTH        000001
  55.  
  56. #define C_ISUID        004000
  57. #define C_ISGID        002000
  58. #define C_ISVTX        001000
  59.  
  60. #define C_ISBLK        060000
  61. #define C_ISCHR        020000
  62. #define C_ISDIR        040000
  63. #define C_ISFIFO    010000
  64. #define C_ISSOCK    0140000
  65. #define C_ISLNK        0120000
  66. #define C_ISCTG        0110000
  67. #define C_ISREG        0100000
  68.  
  69. #endif /* cpio.h */
  70.